Skip to content

Document persistent-file MCP OAuth storage in Rust - #2328

Draft
dy-hu wants to merge 1 commit into
mainfrom
dy-hu-expose-oauth-file-mode
Draft

Document persistent-file MCP OAuth storage in Rust#2328
dy-hu wants to merge 1 commit into
mainfrom
dy-hu-expose-oauth-file-mode

Conversation

@dy-hu

@dy-hu dy-hu commented Aug 13, 2026

Copy link
Copy Markdown

Why

The Copilot agent runtime is adding a persistent-file MCP OAuth token storage mode. Rust SDK consumers need to be able to select and understand this mode when creating or resuming sessions, including github/github-app#11730.

What changed

  • Document persistent-file on Rust create and resume session configuration APIs and builders.
  • Explain its cross-process persistence, secure file-backed storage, and avoidance of steady-state OS Keychain access.
  • Add focused serialization coverage proving create and resume wire requests preserve the value unchanged.
  • Keep the existing Option<String> API shape so the change remains source compatible and matches the existing wire contract.

Testing

  • cd rust && cargo +nightly-2026-04-14 fmt --check
  • cd rust && cargo clippy --all-features --lib --tests -- -D warnings
  • cd rust && cargo test --all-features session_configs_serialize_persistent_file_oauth_storage

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@dy-hu
dy-hu requested a review from a team as a code owner August 13, 2026 16:37
Copilot AI balanced review requested due to automatic review settings August 13, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents Rust support for the persistent-file MCP OAuth storage mode while preserving the existing string-based API.

Changes:

  • Documents behavior for create and resume configurations/builders.
  • Tests unchanged wire serialization for both request paths.
Show a summary per file
File Description
rust/src/types.rs Adds API documentation and serialization coverage.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@SteveSandersonMS

Copy link
Copy Markdown
Contributor

Thanks for documenting the new persistent-file MCP OAuth token storage mode for Rust, and for adding the wire serialization test — that part looks good.

Since this is a runtime-wide capability, could you extend the same support/documentation to the other SDKs (Node, C#, Python, Go, and Java) so all 6 stay consistent? Specifically:

  • C# and Python: these currently model the field as a closed type (McpOAuthTokenStorageMode enum in C#, Literal["persistent", "in-memory"] in Python), so persistent-file can't even be passed today — please widen those types to accept the new value.
  • Node, Go, Java: these already accept arbitrary strings, so this is a docs-only update (mirroring what you did for Rust).

For test coverage, please stick to focused unit-level serialization/wiring tests per language (like the one you added for Rust) rather than new E2E tests — that keeps this change proportional to its scope.

Documenting/enabling this only in Rust leaves an avoidable capability and documentation gap for users of the other 5 SDKs. Once the above is in, please mark this ready for review again. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants